package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.RelativeMapper;
import com.ruoyi.system.domain.Relative;
import com.ruoyi.system.service.IRelativeService;

/**
 * 亲人表Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-10-13
 */
@Service
public class RelativeServiceImpl implements IRelativeService 
{
    @Autowired
    private RelativeMapper relativeMapper;

    /**
     * 查询亲人表
     * 
     * @param id 亲人表主键
     * @return 亲人表
     */
    @Override
    public Relative selectRelativeById(Long id)
    {
        return relativeMapper.selectRelativeById(id);
    }

    /**
     * 查询亲人表列表
     * 
     * @param relative 亲人表
     * @return 亲人表
     */
    @Override
    public List<Relative> selectRelativeList(Relative relative)
    {
        return relativeMapper.selectRelativeList(relative);
    }

    /**
     * 新增亲人表
     * 
     * @param relative 亲人表
     * @return 结果
     */
    @Override
    public int insertRelative(Relative relative)
    {
        return relativeMapper.insertRelative(relative);
    }

    /**
     * 修改亲人表
     * 
     * @param relative 亲人表
     * @return 结果
     */
    @Override
    public int updateRelative(Relative relative)
    {
        return relativeMapper.updateRelative(relative);
    }

    /**
     * 批量删除亲人表
     * 
     * @param ids 需要删除的亲人表主键
     * @return 结果
     */
    @Override
    public int deleteRelativeByIds(Long[] ids)
    {
        return relativeMapper.deleteRelativeByIds(ids);
    }

    /**
     * 删除亲人表信息
     * 
     * @param id 亲人表主键
     * @return 结果
     */
    @Override
    public int deleteRelativeById(Long id)
    {
        return relativeMapper.deleteRelativeById(id);
    }
}
